<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        [v-cloak]{
            display: none;
        }
    </style>
</head>
<body>
    
    <div id="app">
        <!-- v-pre  跳过vue编译  -->
        <!-- <h2 v-pre>
            {{ 1 + 1 }}
        </h2> -->

        <!-- v-once  只渲染一次 -->
        <!-- <h2 v-once>
            {{ msg }}
        </h2>
        <button @click="fn">点我发送改变</button> -->

        <!-- v-cloak 防止页面闪屏 -->

        <h3 v-cloak>
            {{ msg }}
        </h3>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <script>

        new Vue({
            // 元素
            el: "#app",
            // 定义的数据(状态),
            data: {
                msg: "我是标题"
            },
            methods: {
                fn() {
                    this.msg = "aaaa"
                    console.log(123)
                }
            }
        })
    </script>
</body>
</html>